package contest;

import java.io.*;

public class DigitNumber {
	public static void main(String args[]) throws NumberFormatException, IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String line =br.readLine();
			if(line == null)break;
			int i = Integer.parseInt(line.substring(0, line.indexOf(" ")));
			int j = Integer.parseInt(line.substring(line.indexOf(" ")+1,line.length()));
			String k = (new Integer(i+j)).toString();
			System.out.println(k.length());
		}
	}
}
